<?php
class Car{
    public $a = "bu bolsa maxina";

    public function echo_a(){
        echo $this->a;
    }
    private function mahipi(){
        echo "Bu bolsa mahpi gap";
    }

    public function __construct(){
        echo "any car has 4 wheels";
    }
    public function run(){
        echo "any car can run!";
    }
    public function export(){
        echo "any car can take 5 person";
    }
}

class BMW extends Car{
    public function brand(){
        echo "brand is BMW";
    }
}

class Xfive extends BMW{
    public function carName(){
        echo "My name is X5!";
    }
}

class Tesla extends Car{
    public function tok(){
        echo "This car run by Tok";
    }
}



//$car = new Car();
//$car->export();


//$bmw = new BMW();
//$bmw->export();

$x5 = new Xfive();
$x5->carName();

$x5->echo_a();